#ifndef unigame_Enum_h
#define unigame_Enum_h

#include <vector>
#include <map>
#include "config/Def.h"

namespace unigame
{
	class Enum
	{
	public:
		virtual ~Enum(){};

		int32u ordinal()
		{
			return m_index;
		}

		int32u size()
		{
			return m_vector->size();
		}

		const Enum* operator [](const int32u index) const
		{
			return (*m_vector)[index];
		}

		static void destory();

		static std::vector<Enum*>* getEnum(int32u listIndex)
		{
			if(listIndex < 0 || listIndex >= (int32u)s_list->size())
			{
				return 0;
			}
			return (*s_list)[listIndex];
		}

	protected:
		Enum(int32u listIndex);

	protected:
		static std::vector<std::vector<Enum*>*>* s_list;

		int32u m_index;
		std::vector<Enum*>* m_vector;
	};
}

#endif